using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WDSS : Plant
{
    public float fireTime = 2f;
    private float fireTimer = 0;
    public Transform FirePointTransform;
    public Bullet BulletProfab;

    public float BulletSpeed = 5;
    public int Atk = 20;
    protected override void EnableUpdate()
    {
        fireTimer += Time.deltaTime;
        if (fireTimer > fireTime)
        {
            Fire();
            fireTimer = 0;
        }
    }
    void Fire()
    {
        Bullet bt= GameObject.Instantiate(BulletProfab, FirePointTransform.position, Quaternion.identity);
        bt.SetSpeed(BulletSpeed);
        bt.SetAtk(Atk);
    }
}
